<?php

$host = 'localhost';
$user = 'root';
$pwd = '123456';
$dbname = 'business';

// 创建数据库连接对象
$db = new mysqli($host, $user, $pwd, $dbname);

// 检查连接是否成功
if ($db->connect_errno) {
    die("连接数据库失败: " . $db->connect_error);
}

// 设置字符集为 UTF-8
$db->set_charset('utf8');
